<template>
  <div>
    <h1>本地的 todo list 待办清单</h1>
  </div>
  <el-button plain @click="dialogVisible = true">创建</el-button>

  <el-table :data="list" style="width: 100%">
    <el-table-column prop="date" label="内容" width="180" />
    <el-table-column prop="name" label="时间" width="180" />
    <el-table-column label="操作">
        <el-button type="danger">删除</el-button>
        <el-button type="primary">编辑</el-button>
    </el-table-column>
  </el-table>

  <el-dialog v-model="dialogVisible" title="Tips" width="30%" @close="close">
      <template #header>添加代办</template>
      <div>内容：<input type="text"></div>
      <template #footer>
        <span class="dialog-footer">
          <el-button type="primary" @click="close">
            添加
          </el-button>
        </span>
      </template>
    </el-dialog>

</template>

<script>
export default {
  components: {

  },
  name: '',
  data () {
    return {
      list: [
        {date: 1, name: 2}
      ],
      dialogVisible: false
    }
  },
  created () { },
  mounted () { },
  methods: {
    close () {
      this.$emit('update:dialogVisible', false)
    }
  }

}
</script>

<style scoped lang="less"></style>